import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';

const shopper: AppRouteModule = {
  path: '/shopper',
  name: '电商管理',
  component: LAYOUT,
  redirect: '/shopper/user',
  meta: {
    icon: 'charm:shopping-bag',
    title: '电商管理',
  },
  children: [
    {
      path: 'user',
      name: '用户管理',
      component: () => import('/@/views/shopper/user/index.vue'),
      meta: {
        icon: 'ant-design:user-outlined',
        title: '用户管理',
      },
    },
    {
      path: 'auth',
      name: '权限管理',
      meta: {
        icon: 'ant-design:apartment-outlined',
        title: '权限管理',
      },
      children: [
        {
          path: 'role',
          name: '角色列表',
          component: () => import('/@/views/shopper/role/index.vue'),
          meta: {
            icon: 'ant-design:team-outlined',
            title: '角色列表',
          },
        },
        {
          path: 'auth',
          name: '权限列表',
          component: () => import('/@/views/shopper/auth/index.vue'),
          meta: {
            icon: 'ant-design:branches-outlined',
            title: '权限列表',
          },
        },
      ],
    },
    {
      path: 'goods',
      name: '商品管理',
      meta: {
        icon: 'ant-design:shopping-outlined',
        title: '商品管理',
      },
      children: [
        {
          path: 'productList',
          name: '商品列表',
          component: () => import('/@/views/shopper/goods/productList/index.vue'),
          meta: {
            icon: 'ant-design:profile-outlined',
            title: '商品列表',
          },
        },
        {
          path: 'classificationParameter',
          name: '分类参数',
          component: () => import('/@/views/shopper/goods/classificationParameter/index.vue'),
          meta: {
            icon: 'ant-design:deployment-unit-outlined',
            title: '分类参数',
          },
        },
        {
          path: 'classification',
          name: '商品分类',
          component: () => import('/@/views/shopper/goods/classification/index.vue'),
          meta: {
            icon: 'ant-design:appstore-outlined',
            title: '商品分类',
          },
        },
      ],
    },
    {
      path: 'orders',
      name: '订单管理',
      component: () => import('/@/views/shopper/order/index.vue'),
      meta: {
        icon: 'ant-design:file-text-outlined',
        title: '订单管理',
      },
    },
    {
      path: 'report',
      name: '数据统计',
      component: () => import('/@/views/shopper/report/index.vue'),
      meta: {
        icon: 'ant-design:line-chart-outlined',
        title: '数据统计',
      },
    },
  ],
};

export default shopper;
